package com.example.student1.service;

import com.example.student1.dao.StudentRepository;
import com.example.student1.domain.Student;
//import com.example.student1.domain.Student_Login;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface StudentService {


    /*查询所有学生*/
    List<Student> findAll();

    Page<Student> findbyname(String name,Pageable pageable);

    /*分页查询*/
    Page<Student>findAll(Pageable pageable);

    /*分页example查询*/
    Page<Student>findbyexample(Example<Student> student,Pageable pageable);

    /*插入学生*/
    Student insert(Student student);

    /*更新学生*/
     Student update(Student student);

    /*获取学生根据id*/
     Student getById(Long id);
    /*删除学生*/
     void delete(Student student);
    /*查找学生*/
    void find(Student student);
    /*根据姓查询*/
    List<Student> findbyname(String name);

    /*List<Student> findByNameAndPassword(String name ,String password);*/

    /*根据id删除*/
    void deletbyid(Long id);
}
